package demo5;
//内部类
class Outer {
    public int data1 = 20;
    public String data2;
    //静态内部类
    static class Inter {
        public int data3;
        private int data4;

        public void func1() {
            System.out.println("静态内部类");
            Outer outer = new Outer();
            System.out.println(outer.data1);
            System.out.println(outer.data2);
            System.out.println(data3);
            System.out.println(data4);
        }
    }
    private void func2() {
        System.out.println("外部类");
    }
}
public class Test {
    public static void main(String[] args) {
        Outer.Inter inter = new Outer.Inter();
        inter.func1();
    }
}
